/** 支持搜索的媒体类型 */
export type SupportVideoType =
    | "movies"
    | "tv"
    | "cartoon"
    | "all";

export type SupportMediaItemBase = {
    [T in SupportVideoType]: VideoItem;
}

/** 视频基础信息 */
export interface IVideoBase {
    id: string;
    title: string;
    img: string;
    $?: any;
    [k: symbol | string]: any;
}

/** 播放源 */
export interface PlaySource {
    id: string,
    name: string,
    episodes: Episode[];
}

/** 剧集 */
export interface Episode {
    id: string,
    sourceIndex?: number,  // 改为可选属性
    episodeIndex?: number,  // 改为可选属性
    title: string,
    url: string
}

export interface VideoItem extends IVideoBase {

}

/** 视频信息介绍信息 */
export interface VideoIntroduceInfo extends IVideoBase {
    /*** 视频介绍 */
    introduce: string;
    /*** 更新时间 */
    updateTime?: string,
    /*** 评分 */
    score?: number|string,
    /*** 导演 */
    actor: string,
    /*** 类型 */
    category: string,
    /*** 地区 */
    area: string,
    /*** 年份 */
    year: string,
}

/** 当前播放信息 */
export interface CurrentPlayingInfo {
    id: string,
    currentEpisode: number,
    videoUrl: string,
    currentSource: string,
    //添加其它可选属性
    [key: string]: any;
}

/** 视频详情信息 */
export interface VideoDetailInfo extends IVideoBase {
    /*** 视频介绍 */
    introduce: string;
    /*** 播放源 */
    playSources: PlaySource[],

    /*** 当前播放信息 */
    currentVideoInfo: CurrentPlayingInfo
}